<template>
  <div class="about">
    <!-- 子传父 -->
   <son1 @lmx="getVal"></son1>
   <h1>{{val}}</h1>
  </div>
</template>
<script>
import son1 from '@/components/son1.vue'
export default {
  data(){
    return{
     val:''
    }
  },
  methods: {
    getVal(a){
      console.log(a);
      this.val=a
    }
  },
  // 子组件注册
  components:{
    son1
  }
}
</script>

